#!/usr/bin/python
# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: jaewon

import json
import os
import sys
import time

slurm_environ = {k: v for k, v in os.environ.items() if k.startswith('SLURM')}
json_str = json.dumps(slurm_environ, sort_keys=True, indent=2)
sys.stdout.write(json_str)
sys.stdout.flush()

try:
  while True:
    time.sleep(3600)
except Exception:
  pass
